package me.zhengjie.pojo;

import lombok.Data;
import me.zhengjie.pojo.sqlServer.PPInfo;

@Data
public class InBoundInfo {

    private String palletCode;

    private StringPPInfo ppInfo;

    private String stationCode;

    //0未打包，1打包(默认为未打包)
    private Integer isPackage = 0;

    // 校验方法
    public void validate() throws IllegalArgumentException {
        if (palletCode == null || palletCode.trim().isEmpty()) {
            throw new IllegalArgumentException("palletCode 不能为空或 null");
        }
        if (ppInfo == null) {
            throw new IllegalArgumentException("ppInfo 不能为 null");
        }
        if (stationCode == null || stationCode.trim().isEmpty()) {
            throw new IllegalArgumentException("stationCode 不能为空或 null");
        }
    }

}
